package com.photo.photePro.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 收藏实体类
 */
@Data
@TableName("collection")
public class Collection implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    private Long photoId; // 摄影作品ID
    
    private Long userId; // 用户ID
    
    private LocalDateTime createTime; // 收藏时间
    
    // 非数据库字段，用于前端展示
    @TableField(exist = false)
    private String title;
    
    @TableField(exist = false)
    private String description;
    
    @TableField(exist = false)
    private String imgUrl;
    
    @TableField(exist = false)
    private String author;
    
    @TableField(exist = false)
    private Integer viewCount;
} 